// app/lib/zcy-crypto.js
const { sm2, sm3, sm4 } = require('sm-crypto');

class ZcyCrypto {
  static encryptSM4(data, key) {
    return sm4.encrypt(data, key);
  }

  static signSM2(data, privateKey) {
    return sm2.sign(data, privateKey);
  }

  static hashSM3(data) {
    return sm3(data);
  }
}